﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace BoriPeter.FatSecret.Models
{
    [XmlRoot("foods", Namespace = "http://platform.fatsecret.com/api/1.0/")]
    public class FoodsGetFavoritesModel
    {
        /// <summary>
        /// Each day element contains summary nutritional information for a single day.
        /// </summary>
        [XmlElement("food")]
        public FoodGetFavoritesFood[] Foods { get; set; }
    }

    public class FoodGetFavoritesFood
    {
        /// <summary>
        /// the unique food identifier.
        /// </summary>
        [XmlElement("food_id")]
        public int FoodId { get; set; }

        /// <summary>
        /// the name of the food, not including the brand name. E.G.: "Instant Oatmeal".
        /// </summary>
        [XmlElement("food_name")]
        public string FoodName { get; set; }

        /// <summary>
        /// takes the value "Brand" or "Generic". Indicates whether the food is a brand or generic item – see food_type
        /// </summary>
        [XmlElement("food_type")]
        public string FoodType { get; set; }

        /// <summary>
        /// the brand name, only when food_type is "Brand". E.G.: "Quaker".
        /// </summary>
        [XmlElement("brand_name")]
        public string BrandName { get; set; }

        /// <summary>
        /// URL of this food item on www.fatsecret.com.
        /// </summary>
        [XmlElement("food_url")]
        public string FoodUrl { get; set; }

        /// <summary>
        /// A summary description of key nutritional values for a nominated serving size.
        /// </summary>
        [XmlElement("food_description")]
        public string FoodDescription { get; set; }

        /// <summary>
        /// the unique serving identifier, only if this has been specified
        /// </summary>
        [XmlElement("serving_id")]
        public int ServingId { get; set; }

        /// <summary>
        /// is a Decimal - the number of units for this serving, only if this has been specified.
        /// </summary>
        [XmlElement("number_of_units")]
        public decimal NumberOfUnits { get; set; }
    }
}
